home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 40
/
Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso
/
Aminet
/
util
/
cdity
/
ModeProSrc.lha
/
Daemon
/
ptDebug.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-10-18
|
10KB
|
381 lines
#include "mp.h"
#include "patchdata.h"
#include <tagitemmacros.h>
#define DEBUG
#include <debug.h>
extern struct MPSem *MPSem;
UBYTE *FindWinTagString(ULONG id);
void PrintTags(struct TagItem *tags)
{
struct TagItem *tag,*tstate;
ProcessTagList(tags,tag,tstate)
{
DKP(FindTagString(tag->ti_Tag),tag->ti_Data,tag->ti_Tag);
}
}
ULONG TagID[]=
{
SA_Left,
SA_Top,
SA_Width,
SA_Height,
SA_Depth,
SA_DetailPen,
SA_BlockPen,
SA_Title,
SA_Colors,
SA_ErrorCode,
SA_Font,
SA_SysFont,
SA_Type,
SA_BitMap,
SA_PubName,
SA_PubSig,
SA_PubTask,
SA_DisplayID,
SA_DClip,
SA_Overscan,
SA_Obsolete1,
SA_ShowTitle,
SA_Behind,
SA_Quiet,
SA_AutoScroll,
SA_Pens,
SA_FullPalette,
SA_ColorMapEntries,
SA_Parent,
SA_Draggable,
SA_Exclusive,
SA_SharePens,
SA_BackFill,
SA_Interleaved,
SA_Colors32,
SA_VideoControl,
SA_FrontChild,
SA_BackChild,
SA_LikeWorkbench,
SA_Reserved,
SA_MinimizeISG,
SA_ModeProNode,
0xffffffff,
};
UBYTE *TagStrings[]=
{
" SA_Left %11ld\n",
" SA_Top %11ld\n",
" SA_Width %11ld\n",
" SA_Height %11ld\n",
" SA_Depth %11ld\n",
" SA_DetailPen %11ld\n",
" SA_BlockPen %11ld\n",
" SA_Title %s\n",
" SA_Colors 0x%08lx\n",
" SA_ErrorCode 0x%08lx\n",
" SA_Font 0x%08lx\n",
" SA_SysFont %11ld\n",
" SA_Type 0x%08lx\n",
" SA_BitMap 0x%08lx\n",
" SA_PubName %s\n",
" SA_PubSig 0x%08lx\n",
" SA_PubTask 0x%08lx\n",
" SA_DisplayID 0x%08lx\n",
" SA_DClip 0x%08lx\n",
" SA_Overscan %11ld\n",
" SA_Obsolete1 %11ld\n",
" SA_ShowTitle %11ld\n",
" SA_Behind %11ld\n",
" SA_Quiet %11ld\n",
" SA_AutoScroll %11ld\n",
" SA_Pens 0x%08lx\n",
" SA_FullPalette %11ld\n",
" SA_ColorMapEntries %11ld\n",
" SA_Parent 0x%08lx\n",
" SA_Draggable %11ld\n",
" SA_Exclusive %11ld\n",
" SA_SharePens %11ld\n",
" SA_BackFill 0x%08lx\n",
" SA_Interleaved %11ld\n",
" SA_Colors32 0x%08lx\n",
" SA_VideoControl 0x%08lx\n",
" SA_FrontChild 0x%08lx\n",
" SA_BackChild 0x%08lx\n",
" SA_LikeWorkbench %11ld\n",
" SA_Reserved %11ld\n",
" SA_MinimizeISG %11ld\n",
" SA_ModeProNode %11ld (Hacked Tag)\n",
" Unknown Tag %11ld (TagID $0x%08lx)\n"
};
UBYTE *FindTagString(ULONG id)
{
ULONG l;
for(l=0;;l++)
{
if(TagID[l]==id || TagID[l]==0xffffffff)
return(TagStrings[l]);
}
return(TagStrings[l]);
}
STRPTR dbType[]=
{
"Program Name",
"Screen Name",
"Screen Mode",
"Public Screen"
};
STRPTR dbModeSelect[]=
{
"None",
"Monitor",
"ScreenMode",
"Requester",
"Best Mode"
};
void PrintDefNode(struct DefaultNode *DN)
{
DKP("DefaultNode(0x%08lx) -- ModePro Promotion Node\n",DN);
DKP(" Node.ln_Name : %s\n",DN->Def_Node.ln_Name);
DKP(" Type : %ld %s\n",DN->Type,dbType[DN->Type]);
DKP(" ModeSelect : %ld %s\n",DN->ModeSelect,dbModeSelect[DN->ModeSelect]);
DKP(" ModeID : 0x%08lx\n", DN->ModeID);
DKP(" Width : %ld\n", DN->Width);
DKP(" Height : %ld\n", DN->Height);
DKP(" OverscanType : %ld\n", DN->OverscanType);
DKP(" AutoScroll : %ld\n", DN->AutoScroll);
DKP(" Look3D : %ld\n", DN->Look3D);
DKP(" Flags : 0x%08lx\n", DN->Flags);
DKP(" OrigDisplayID: 0x%08lx\n", DN->OrigDisplayID);
}
void PrintOverscanInfo(struct PatchData *pd)
{
if(MPSem->Debug)
{
if(GetDisplayInfoData(NULL,(UBYTE *)&pd->DimInfo,sizeof(struct DimensionInfo),DTAG_DIMS,pd->ModeID))
{
DKP("Overscan Type=%ld\n",pd->OverscanType);
DKP("Text Size : DimInfo.TxtOScan.MinX=%ld DimInfo.TxtOScan.MaxX=%ld\n",pd->DimInfo.TxtOScan.MinX,pd->DimInfo.TxtOScan.MaxX);
DKP(" DimInfo.TxtOScan.MinY=%ld DimInfo.TxtOScan.MaxY=%ld\n",pd->DimInfo.TxtOScan.MinY,pd->DimInfo.TxtOScan.MaxY);
DKP("Graphics Size : DimInfo.StdOScan.MinX=%ld DimInfo.StdOScan.MaxX=%ld\n",pd->DimInfo.StdOScan.MinX,pd->DimInfo.StdOScan.MaxX);
DKP(" DimInfo.StdOScan.MinY=%ld DimInfo.StdOScan.MaxY=%ld\n",pd->DimInfo.StdOScan.MinY,pd->DimInfo.StdOScan.MaxY);
DKP("Extreme Size : DimInfo.VideoOScan.MinX=%ld DimInfo.VideoOScan.MaxX=%ld\n",pd->DimInfo.VideoOScan.MinX,pd->DimInfo.VideoOScan.MaxX);
DKP(" DimInfo.VideoOScan.MinY=%ld DimInfo.VideoOScan.MaxY=%ld\n",pd->DimInfo.VideoOScan.MinY,pd->DimInfo.VideoOScan.MaxY);
DKP("Maximum Size : DimInfo.MaxOScan.MinX=%ld DimInfo.MaxOScan.MaxX=%ld\n",pd->DimInfo.MaxOScan.MinX,pd->DimInfo.MaxOScan.MaxX);
DKP(" DimInfo.MaxOScan.MinY=%ld DimInfo.MaxOScan.MaxY=%ld\n",pd->DimInfo.MaxOScan.MinY,pd->DimInfo.MaxOScan.MaxY);
}
}
}
/*
void PrintPatchData(struct PatchData *PD)
{
DKP("struct PatchData (0x%08lx)\n",PD);
DKP("
}
*/
void PrintWindowTags(struct TagItem *TagList)// (4.56.4)
{
struct TagItem *tag,*tstate;
DKP(" TagList:0x%08lx\n",TagList);
if(TagList)
{
ProcessTagList(TagList,tag,tstate)
{
DKP(FindWinTagString(tag->ti_Tag),tag->ti_Data,tag->ti_Tag);
}
}
}
#include <intuition/intuition.h>
ULONG WinTagID[]=
{
WA_Left,
WA_Top,
WA_Width ,
WA_Height ,
WA_DetailPen ,
WA_BlockPen ,
WA_IDCMP ,
WA_Flags ,
WA_Gadgets ,
WA_Checkmark ,
WA_Title ,
WA_ScreenTitle ,
WA_CustomScreen ,
WA_SuperBitMap ,
WA_MinWidth ,
WA_MinHeight ,
WA_MaxWidth ,
WA_MaxHeight ,
WA_InnerWidth ,
WA_InnerHeight ,
WA_PubScreenName ,
WA_PubScreen ,
WA_PubScreenFallBack ,
WA_WindowName ,
WA_Colors ,
WA_Zoom ,
WA_MouseQueue ,
WA_BackFill ,
WA_RptQueue ,
WA_SizeGadget ,
WA_DragBar ,
WA_DepthGadget ,
WA_CloseGadget ,
WA_Backdrop ,
WA_ReportMouse ,
WA_NoCareRefresh ,
WA_Borderless ,
WA_Activate ,
WA_RMBTrap ,
WA_WBenchWindow ,
WA_SimpleRefresh ,
WA_SmartRefresh ,
WA_SizeBRight ,
WA_SizeBBottom ,
WA_AutoAdjust ,
WA_GimmeZeroZero ,
WA_MenuHelp ,
WA_NewLookMenus ,
WA_AmigaKey ,
WA_NotifyDepth ,
WA_Pointer ,
WA_BusyPointer ,
WA_PointerDelay ,
WA_TabletMessages ,
WA_HelpGroup ,
WA_HelpGroupWindow ,
0xffffffff
};
STRPTR WinTagStrings[]=
{
" WA_Left %11ld\n",
" WA_Top %11ld\n",
" WA_Width %11ld\n",
" WA_Height %11ld\n",
" WA_DetailPen %11ld\n",
" WA_BlockPen %11ld\n",
" WA_IDCMP 0x%08lx\n",
" WA_Flags 0x%08lx\n",
" WA_Gadgets 0x%08lx\n",
" WA_Checkmark 0x%08lx\n",
" WA_Title %s\n",
" WA_ScreenTitle %s\n",
" WA_CustomScreen 0x%08lx\n",
" WA_SuperBitMap 0x%08lx\n",
" WA_MinWidth %11ld\n",
" WA_MinHeight %11ld\n",
" WA_MaxWidth %11ld\n",
" WA_MaxHeight %11ld\n",
" WA_InnerWidth %11ld\n",
" WA_InnerHeight %11ld\n",
" WA_PubScreenName %s\n",
" WA_PubScreen 0x%08lx\n",
" WA_PubScreenFallBack %11ld\n",
" WA_WindowName %s\n",
" WA_Colors %11ld\n",
" WA_Zoom 0x%08lx\n",
" WA_MouseQueue %11ld\n",
" WA_BackFill 0x%08lx\n",
" WA_RptQueue %11ld\n",
" WA_SizeGadget %11ld\n",
" WA_DragBar %11ld\n",
" WA_DepthGadget %11ld\n",
" WA_CloseGadget %11ld\n",
" WA_Backdrop %11ld\n",
" WA_ReportMouse %11ld\n",
" WA_NoCareRefresh %11ld\n",
" WA_Borderless %11ld\n",
" WA_Activate %11ld\n",
" WA_RMBTrap %11ld\n",
" WA_WBenchWindow %11ld\n",
" WA_SimpleRefresh %11ld\n",
" WA_SmartRefresh %11ld\n",
" WA_SizeBRight %11ld\n",
" WA_SizeBBottom %11ld\n",
" WA_AutoAdjust %11ld\n",
" WA_GimmeZeroZero %11ld\n",
" WA_MenuHelp %11ld\n",
" WA_NewLookMenus %11ld\n",
" WA_AmigaKey 0x%08lx\n",
" WA_NotifyDepth %11ld\n",
" WA_Pointer 0x%08lx\n",
" WA_BusyPointer 0x%08lx\n",
" WA_PointerDelay %11ld\n",
" WA_TabletMessages %11ld\n",
" WA_HelpGroup %11ld\n",
" WA_HelpGroupWindow 0x%08lx\n",
" Unknown Tag %11ld (TagID $0x%08lx)\n"
};
UBYTE *FindWinTagString(ULONG id)
{
ULONG l;
for(l=0;;l++)
{
if(WinTagID[l]==id || WinTagID[l]==0xffffffff)
return(WinTagStrings[l]);
}
return(TagStrings[l]);
}
void PrintNewWindowData(struct ExtNewWindow *nw)// (4.56.3)
{
DKP(" NewWindow:0x%08lx\n",nw);
if(nw)
{
DKP(" LeftEdge %11ld TopEdge %11ld\n", nw->LeftEdge, nw->TopEdge);
DKP(" Width %11ld Height %11ld\n", nw->Width, nw->Height);
DKP(" DetailPen %11ld BlockPen %11ld\n", nw->DetailPen, nw->BlockPen);
DKP(" IDCMPFlags 0x%08lx\n", nw->IDCMPFlags);
DKP(" Flags 0x%08lx\n", nw->Flags);
DKP(" FirstGadget 0x%08lx\n", nw->FirstGadget);
DKP(" CheckMark 0x%08lx\n", nw->CheckMark);
DKP(" Title %s\n", nw->Title);
DKP(" Screen 0x%08lx\n",nw->Screen);
DKP(" BitMap 0x%08lx\n",nw->BitMap);
DKP(" MinWidth %11ld MinHeight %11ld\n", nw->MinWidth, nw->MinHeight);
DKP(" MaxWidth %11ld MaxHeight %11ld\n", nw->MaxWidth, nw->MaxHeight);
DKP(" Type %11ld\n", nw->Type);
if(nw->Flags & WFLG_NW_EXTENDED)
{
DKP(" Extension 0x%08lx\n", nw->Extension);
PrintWindowTags(nw->Extension);
}
}
}